<%@ page import="com.etc.entity.Admin" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    // 获得项目完全路径（假设你的项目叫MyApp，那么获得到的地址就是http://localhost:8080/MyApp/）: 
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html>
<html>
	<!--商家信息修改界面-->
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compa tible" content="IE=edge,chrome=1">
		<meta name="format-detection" content="telephone=no" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<link href="<%=basePath %>css/bksystem.css" rel="stylesheet" type="text/css" /> 
		<link href="<%=basePath %>font/iconfont.css" rel="stylesheet" type="text/css" />
		<link href="<%=basePath %>css/module.css" rel="stylesheet" type="text/css" />
		<link href="<%=basePath %>css/pages.css" rel="stylesheet" type="text/css" />
		<title>商品管理</title>
		<script src="<%=basePath %>js/jquery-1.9.1.min.js" type="text/javascript"></script>
		<script src="<%=basePath %>js/jquery.nicescroll.js" type="text/javascript"></script>
		<script src="<%=basePath %>js/HUpages.js" type="text/javascript"></script>
		<script src="<%=basePath %>js/common.js" type="text/javascript"></script>
	</head>

<body id="situation">
<%
    //从session中取出登录的对象
    Admin user = (Admin) session.getAttribute("loginUser");
    if (user == null){
        //用户没有登录
        session.setAttribute("loginMes","请先登录");
        //跳转到登录页面   必须用重定向！！！ 转发会携带参数
        response.sendRedirect("login.jsp");
    }

%>
 <center>
 <!-- 判断是否要提交 -->
  <script language="javascript">
    function sumbit_sure(){
    	if (document.getElementById('sex').value != '男' &&document.getElementById('sex').value != '女' )
		{
		alert('性别不正确')
		return false;
		}
	if (!reg_te
        var gnl=confirm("确定要提交?");
        if (gnl==true){
            return true;
        }else{
            return false;
        }
    }
    </script>
        <form action="<%=basePath %>b/update.do" method="post" id="form" onsubmit="return sumbit_sure();">
           <!-- 修改表单 -->
            <table border="0" cellspacing="" cellpadding="">
            	<input type ="hidden" name="id" value=${Business.id } />
                <tr>
                    <td><label for="firstname">姓名:</label></td>
                    <td><input type="text" name="name" id="firstname" required="required" value="${Business.name }" /></td>
                </tr>
                <tr>
                    <td><label for="lastname">说明:</label></td>
                    <td><input type="text" name="gxqm" id="lastname" required="required" value="${Business.gxqm}" /></td>
                </tr>
                <tr>
                    <td><label for="lastname">密码:</label></td>
                    <td><input type="password" name="pwd" id="psd" readonly="readonly  required="required" value="${Business.pwd}" />
                     <button onclick="resetPsd();return false;">重置</button></td>
                   
                    <script type="text/javascript">
                    	function resetPsd() {
                    		var selectId = document.getElementById("psd");
                    	    selectId.value = "000000";
                    	    selectId.placeholder = "000000";
                    	    console.log(selectId.value)
                    	}
                    </script>
                </tr>
                <tr>
                    <td><label for="login name">性别:</label></td>
                    <td><input type="text" name="sex" id="sex" value="${Business.sex}" />
                    	
                    </td>
                    
                </tr>
               
                
            </table>
           
            <input type="submit"  value="提交" />
                 
        </form>
        </center>
 </body>
</html>
<script>
$(function(){
	//内页框架结构编辑
	$("#situation").Hupage({
		slide: '#breadcrumb',
		padding:15,
		menuModule:'#bk-con-menu', //菜单模块
		pagecontent:'.page_content',//自定义属性
		operation:'.operation',//自定义属性
		scrollbar:function(e){
			e.niceScroll({
				cursorcolor: "#dddddd",
				cursoropacitymax: 1,
				touchbehavior: false,
				cursorwidth: "3px",
				cursorborder: "0",
				cursorborderradius: "3px",
			});						
		},
		expand:function(thisBox,settings){	
			var pc="";
			$(settings.pagecontent).css("margin-bottom")!=null? pc=parseInt($(settings.pagecontent).css("margin-bottom").replace("px","")):'';
		    $(settings.pagecontent).css({height:$(window).height()-$(settings.operation).outerHeight()-pc-(settings.padding*2)})
		    settings.scrollbar($(settings.slide) && $(settings.pagecontent));		    
		}//自定义方法
	});
 });
</script>
